<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/jsp/commons/taglibs.jsp" %>
<!-- 分页显示演示开始 -->
<form id="listForm" class="well form-search" action="${ctx}/sms/list" method="post">
    <input type="hidden" name="pageNo" id="pageNo" value="${pageData.pagination.pageNo}"/>
    <input type="hidden" name="fieldName" id="fieldName" value="${pageData.compositor.fieldName}"/>
    <input type="hidden" name="compositorType" id="compositorType" value="${pageData.compositor.compositorType}"/>
    <table class="table table-striped table-bordered table-condensed">
        <tr align="center">
            <th>
                手机号|内容：
                <y:search fieldType="S" fieldList="mobile,content" matchType="LIKE"
                          className="input-medium search-query"/>
                <button class="btn btn-small" onclick="search()" type="button">
                    <i class="icon-search"></i>
                    搜索
                </button>
            </th>
        </tr>
    </table>
</form>
<table class="table table-striped table-bordered table-condensed">
    <thead>
    <tr>
        <th>#</th>
        <th>
            <a href="javascript:sort('mobile')">手机号</a>
        </th>
        <th>
            <a href="javascript:sort('content')">内容</a>
        </th>
        <th>
            <a href="javascript:sort('stime')">发送/接收时间</a>
        </th>
        <th>
            <a href="javascript:sort('type')">类型</a>
        </th>
        <th>
            <a href="javascript:sort('state')">状态</a>
        </th>
        <%--<th>操作</th>--%>
    </tr>
    </thead>
    <tbody>
    <c:forEach var="entity" items="${pageData.result}" varStatus="index">
        <tr <c:if test="${!entity.visible}">bgcolor="#AFEEEE"</c:if>>
            <td>${index.index + 1}</td>
            <td title="${entity.mobile}">${fn:substring(entity.mobile,0,11) } ${fn:length(entity.mobile) > 11 ? "...":""}</td>
                <%--<td>${fn:substring(entity.mobile,0,4) }****${fn:substring(entity.mobile,fn:length(entity.mobile) - 4,fn:length(entity.mobile)) }</td>--%>
            <td title="${entity.content}">
                    ${fn:substring(entity.content,0,20)}
                <c:if test="${fn:length(entity.content) > 15 }">...</c:if>
            </td>
            <td>${entity.stime}</td>
            <td>${entity.type.value}</td>
            <td>${entity.state.value}</td>
                <%--<td>--%>
                <%--<a href="${ctx}/sms/delete/${entity.id}" confirm="删除后无法恢复,确定要删除吗?">刪除</a>--%>
                <%--</td>--%>
        </tr>
    </c:forEach>
    </tbody>
</table>
<%@ include file="/WEB-INF/jsp/commons/pager.jsp" %>